<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>{{ age }}</p>
        <!-- 26 -->
        <p>{{ age + 10 }}</p>
        <!-- false -->
        <p>{{ age >= 18 }}</p>
        <!-- true -->
        <p>{{ age >= 18 || age % 2 == 0 }}</p>
        <!-- 三元表达式 -->
        <p>{{ age >= 18 ? '成年' : '未成年' }}</p>

        <!-- 不能写语句 -->
        <!-- <p> {{ if (age >= 18) '成年' else '未成年' }}  </p> -->
    </div>
    
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                    age: 16
                }
            },
        })
    </script>
</body>
</html>